const {ccclass, property} = cc._decorator;

@ccclass
export default class Ripple extends cc.Component {


    sinePara:number = 0;
    initPos: cc.Vec2 = new cc.Vec2();
    start () {
        this.initPos = new cc.Vec2(this.node.x,this.node.y);
    }

    update (dt) {
        if(this.node){
            this.sinePara += 0.01;
            this.node.x = this.initPos.x + Math.sin(this.sinePara)*500;
            this.node.y = this.initPos.y + Math.cos(this.sinePara)*5;
        }
    }
}
